package com.cloudkinto.service.company.vo;

import cn.hutool.core.date.DateUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * temu退货单创建/修改响应
 *
 * @author long
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TemuReturnOrderOperateResponse {

    @ApiModelProperty(value = "是否成功", required = true)
    @Builder.Default
    private Boolean success = false;

    @ApiModelProperty(value = "错误码", required = true)
    @Builder.Default
    private Integer errorCode = 0;

    @ApiModelProperty(value = "错误信息")
    private String errorMsg;

    @ApiModelProperty(value = "系统服务时间，秒级时间戳", required = true)
    @Builder.Default
    private Integer serverTime = Math.toIntExact(DateUtil.currentSeconds());

    @ApiModelProperty(value = "查询结果", required = true)
    private Result result;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Result {

        @ApiModelProperty(value = "temu 退货入库单号，必须返回", required = true)
        private String returnOrderNo;

        /**
         * 使用{@link ReturnOrderStatusEnum#getCode()}
         */
        @ApiModelProperty(value = "退货入库单状态，详情见退货入库单状态枚举值", required = true)
        private Integer orderStatus;

    }
}
